/**
 * 功能描述: 功能复选框样式表
 * @author 崔孝楠
 * @date 2022/9/29 17:06
 * @version 1.0
 */
@import '../../style/index.scss';
@import '../Checkbox/checkboxConstant';

// 全选按钮选中布局
@mixin checkbox-indeterminate-inner--layout {
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
}

// label 布局
@include b(checkbox) {
  // label文本
  + span {
    padding-right: 8px;
    padding-left: 8px;
  }
}

// 全选按钮样式
@include b(checkbox-wrapper-indeterminate) {
  // 全选按钮框颜色
  @include b(checkbox-inner) {
    background-color: $color-white;
    border-color: $--checkbox-border-color-grey;

    // 全选按钮选中样式
    &::after {
      background-color: $--checkbox-checked-inner-background-color;
      border: 0;
      transform: translate(-50%,-50%) scale(1);
      opacity: 1;
      content: " ";
      @include checkbox-indeterminate-inner--layout;
    }
  }
}

// 禁用状态选中样式
@include b(checkbox-wrapper-disabled) {
  @include b(checkbox-indeterminate) {
    .#{$namespace}-checkbox-inner::after {
      background-color: $--checkbox-disabled-inner-border-color;
    }
  }
}
